home *** CD-ROM | disk | FTP | other *** search
-
-
-
- LSEEK(3) MINTLIB LIBRARY FUNCTIONS LSEEK(3)
-
-
- N✓NA✓AM✓ME✓E
- lseek, tell - move read/write file pointer
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <unistd.h>
-
- long lseek(int fildes, long offset, int mode);
-
- long tell(int fd);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- fildes is a file descriptor returned from a creat, open,
- dup, or fcntl system call. lseek sets the file pointer
- associated with fildes as follows, according to value of
- the mode paramater:
- - SEEK_SET (0): the pointer is set to offset bytes -
- SEEK_CUR (1): the pointer is set to its current
- location plus offset - SEEK_END (2): the
- pointer is set to the size of
- the file plus offset
-
- If the seek would set the pointer beyond the end of the
- file, and the file is then written to, the file is
- extended with zeros. If the filesystem supports sparse
- files, this may not take much space on disc.
-
- The obsolete function tell(fd) is equivalent to:
- lseek(fd, 0L, SEEK_CUR).
-
- R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
- On success, the new position of the file pointer is
- returned. On failure, a negative number is returned, and
- errno is set.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- c✓cr✓re✓ea✓at✓t(✓(3✓3)✓),✓, d✓du✓up✓p(✓(3✓3)✓),✓, f✓fc✓cn✓nt✓tl✓l(✓(3✓3)✓),✓, f✓fs✓se✓ee✓ek✓k(✓(3✓3)✓),✓, o✓op✓pe✓en✓n(✓(3✓3)✓),✓, F✓Fs✓se✓ee✓ek✓k(✓(2✓2)✓)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-